package com.ehome.poct.base.device.service;

import com.ehome.core.page.Page;
import com.ehome.core.service.AbstractCrudServiceImpl;
import com.ehome.poct.base.api.dto.device.QrCodeHisDetailDTO;
import com.ehome.poct.base.api.dto.device.TestDeviceQrcodePrintHisDTO;
import com.ehome.poct.base.api.virtual.TestDeviceQrcodePrintHisService;
import com.ehome.poct.base.api.vo.device.QrcodePrintHisDetPageVO;
import com.ehome.poct.base.api.vo.device.QrcodePrintHisDetVO;
import com.ehome.poct.base.api.vo.device.QrcodePrintHisPageVO;
import com.ehome.poct.base.api.vo.device.QrcodePrintHisVO;
import com.ehome.poct.base.device.repository.TestDeviceQrcodePrintHisHeadRepository;
import com.ehome.poct.base.device.repository.TestDeviceQrcodePrintHisRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 打印记录详细SerivceImlp
 *
 * @author ehome
 * @Date 2022-07-14 15:54
 */
@Service
public class TestDeviceQrcodePrintHisServiceImpl extends AbstractCrudServiceImpl<TestDeviceQrcodePrintHisDTO> implements TestDeviceQrcodePrintHisService {

    @Autowired
    private TestDeviceQrcodePrintHisRepository repository;

    @Override
    public QrcodePrintHisDetPageVO getList(QrCodeHisDetailDTO req) {
        Page<QrcodePrintHisDetVO> patadatas = repository.pageList(req);
        QrcodePrintHisDetPageVO datas =new QrcodePrintHisDetPageVO();
        datas.setCount(patadatas.getTotal());
        datas.setData(patadatas.getList());
        return datas;
    }
}